<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<form action="${param.action}" method="post">
	<div class="custom-form">
		<ul>
			<li><span>标书名称：</span><input name="name" type="text" class="easyui-textbox" data-options="required:true,validType:['length[1,31]','htmlUnescape']" /></li>
			<!-- 			<li><span>审核日期：</span><input name="auditTime" type="text" class="easyui-datetimebox" /></li> -->
			<c:choose>
				<c:when test="${empty param.pid}">
					<li><span>所属项目：</span><select class="easyui-combogrid" name="project.id"
						data-options="required:true,width : 148,
			panelWidth : 650,
			idField : 'id',
			textField : 'name',
			url : 'agent/bidding/page?sort=createTime,desc',
			pagination : true,
			pageSize : 10,
			pageList : [ 10, 20, 50 ],
			search : {
				position : 'bottom'
			},
        	onShowPanel:function(){
        		$(this).combogrid('grid').datagrid('search.init');
        	},
			columns : [ [ {
				field : 'sn',
				width : 120,
				title : '招标编号'
			}, {
				field : 'name',
				width : 180,
				title : '工程名称'
			}, {
				field : 'principal',
				width : 120,
				title : '建设单位'
			}, {
				field : 'contact',
				width : 80,
				title : '联系人'
			}, {
				field : 'telphone',
				width : 80,
				title : '电话'
			},{
				field : 'userMangerName',
				width : 80,
				title : '项目负责',
				formatter : function(value, row, index) {
					return row.userManager ? row.userManager.name : '';
				}
			}, {
				field : 'userCostName',
				width : 80,
				title : '造价负责',
				formatter : function(value, row, index) {
					return row.userCost ? row.userCost.name : '';
				}
			},{
				field : 'deptBeginName',
				width : 80,
				title : '发起部门',
				formatter : function(value, row, index) {
					return row.dept ? row.dept.name : '';
				}
			}, {
				field : 'userBeginName',
				width : 80,
				title : '发起人',
				formatter : function(value, row, index) {
					return row.createUser ? row.createUser.name : '';
				}
			}]]
            "></select></li>
				</c:when>
				<c:otherwise>
					<input type="hidden" name="project.id" value="${param.pid}" />
				</c:otherwise>
			</c:choose>
			<li><span>文档原件：</span><input name="file" class="easyui-filebox" data-options="required:true,editable:false,buttonText:'选择',icons:[clearInput_icon]" /></li>
			<li><span>备注：</span><input name="description" type="text" class="easyui-textbox" data-options="multiline:true,height:100,validType:['length[1,255]','htmlUnescape']" /></li>
		</ul>
	</div>
</form>